package com.nbsaas.boot.common.data.entity;


import com.nbsaas.boot.code.annotation.FormAnnotation;
import com.nbsaas.boot.code.annotation.FormField;
import com.nbsaas.boot.code.annotation.InputType;
import com.nbsaas.boot.code.annotation.SearchItem;
import com.nbsaas.boot.jpa.data.entity.AbstractEntity;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Data
@FormAnnotation(model = "模块", title = "模块管理", menu = "1,57,58")
@Entity
@Table(name = "bs_tenant_modular")
public class Modular extends AbstractEntity {


    @Column(name = "data_key")
    @FormField(title = "模块key", sortNum = "1", grid = true, col = 22, required = true)
    private String key;

    @SearchItem(label = "模块名称", name = "name", key = "name")
    @FormField(title = "模块名称", sortNum = "10", col = 22, width = "200", grid = true, required = true)
    private String name;

    @FormField(title = "banner图片", sortNum = "20", col = 22, grid = true, type = InputType.image)
    private String banner;

    @FormField(title = "介绍", sortNum = "40", grid = true, col = 22, type = InputType.textarea, width = "1000")
    private String note;
}
